/**
 * File: Node.java
 * Created by: mhaimel
 * Created on: Mar 5, 2010
 * CVS:  $Id: Node.java 1.0 Mar 5, 2010 1:15:44 PM mhaimel Exp $
 */
package uk.ac.ebi.curtain.model.graph;

import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

import uk.ac.ebi.curtain.model.graph.curtain.ContigInfo;
import uk.ac.ebi.curtain.model.graph.curtain.ReadWrapper;


/**
 * @author mhaimel
 *
 */
public interface Node<N,A> {

	Long getId();
	
	N getValue();
	
	void setValue(N value);

	/**
	 * @return the status
	 */
	AtomicInteger getStatus();
	/**
	 * @return the active
	 */
	AtomicBoolean getActive();
	
	boolean isActive();
	
	void setStatus(Integer status);
	
	void setActive(boolean active);
	
	List<Arc<N,A>> getRight();
	List<Arc<N,A>> getLeft();
	
	void removeArc(Arc<N,A> arc);
	
	void removeArc(Arc<N,A> arc, boolean failIfMissing);
	

	List<Arc<N,A>> getArcs(NodeEdge edge);

//	Collection<Arc<N,A>> getArcsTo(NodeEdge edge, Node<N, A> target);

	Arc<N, A> getArcRight(Node<N, A> right, NodeEdge left);
	
	Arc<N, A> getArcLeft(Node<N, A> left, NodeEdge right);
	
	void registerArcRight(Arc<N, A> arc);
	void registerArcLeft(Arc<N, A> arc);

	List<Arc<N,A>> hasArc(Node<ContigInfo, ReadWrapper> nodeC);
	
}
